feat(memory): 6 offline memory verbs via MemoryClient/DirectClient (M2b)#216
Merged
Conversation
- memory search/read/write/edit/list/delete over the store + index, offline - MemoryClient seam (V10): DirectClient in-process impl; DaemonClient lands M2.5. Verbs never touch SQLite/store directly - vault-store.ts: markdown CRUD + YAML frontmatter (title/tags), soft-delete to .trash/, path-safety (safeJoin, no escape) - memory-edit.ts: str_replace + editBody ported verbatim from @agentage/memory-core local-ops (exact+unique, canonical error strings; new_str omitted = delete; str_replace + body = error) - vault resolution: @<vault>/<path> or --vault; single-vault default - 8 MB cap on account (couchdb) vaults; bounded read + search page - vault-scan: extract reconcileIndex() so DirectClient refreshes a warm index - vitest 4: execArgv moved to top-level (poolOptions removed) - offline @p0 e2e (write->search->read->edit->list->delete + canonical error) - 158 unit + 2 e2e green; verified the built binary end to end; cov 87/86/76/89
Contributor
|
🎉 PR Validation ✅ PASSED Commit: Checks:
Ready to merge! ✨ 🔗 View workflow run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second slice of M2 - the 6
agentage memoryverbs, offline. Completes the offline CRUD surface (M2a shipped the index; this ships the verbs over it).What
memory search / read / write / edit / list / delete- full offline CRUD over the store + FTS5 index. Vault by@<vault>/<path>or--vault(single-vault default).--jsonon every verb.MemoryClientseam ([[daemon-index-ownership]] V10): this PR is theDirectClient(in-process) impl; theDaemonClientlands with the daemon (M2.5). Verbs never touch SQLite or the store directly - so nothing here reworks when the daemon becomes the default path.vault-store.ts- markdown CRUD + YAML frontmatter (title/tags), soft-delete to.trash/(recoverable),safeJoinpath-safety (no escape).memory-edit.ts-strReplace+editBodyported verbatim from@agentage/memory-corelocal-ops: exact + unique match, canonical error strings,new_stromitted = delete,str_replace+--body= error, no fuzzy fallback.vault-scangainsreconcileIndex()soDirectClientrefreshes a warm index before search/list.execArgvmoved to the top-level test option (poolOptionswas removed).Verify
npm run verifygreen: type-check (src + e2e), eslint, prettier, 158 unit tests, build. Coverage 87 / 86 / 76 / 89.vault add->memory write @main/notes/a.md --frontmatter {...}->search(bm25 snippet) ->read(frontmatter stripped) ->edit --old/--new->read(changed) ->list->delete(soft; file present in.trash/) ->listempty.@p0e2e passes locally (npx playwright test memory-offline, 2 passed, 2.2s): the full round trip + the canonical "Multiple occurrences" str_replace error.@vault/--vault/ambiguous/unknown resolution + 8 MB cap + read truncation, command arg-mapping.Next: M2.5 harvests the daemon (
ensureDaemon+daemon-client+ vault actions), which becomes the defaultMemoryClientpath; the verbs are unchanged.